Skip to content

fix(standard): write a trial's files whole - #560

Merged
aitianshi merged 2 commits into
mainfrom
fix/trial-write-whole-433
Dec 1, 2026
Merged

aitianshi merged 2 commits into
mainfrom
fix/trial-write-whole-433

Conversation

@aitianshi

Copy link
Copy Markdown
Collaborator

Closes #433

What

  • Trial files were rewritten in place, and merge unlinked each trial's result.json before writing it: a read meanwhile missed the trial.
  • Both now use ondisk.write_whole: a reader sees the old file or the new.
  • A link or folder at the path is still replaced, never written through; a hard link now too.
  • A host run's copy back skips a write's .part file.
  • Trial files are 0644 whatever the umask; umask 077 gave 0600.

Verified

  • Parse during a write paused halfway: trial missing on main, old record here; merge alike.
  • New test: a write failing halfway leaves the previous file or none; main, a part.
  • Backend 3505 (1 module failed under load, passes alone), routes 925.

Risk

  • A killed writer leaves a .part file beside it.
  • Undo: revert.

Agents

  • Claude Code, Opus 5.5

@aitianshi
aitianshi marked this pull request as ready for review December 1, 2026 13:31
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

🟡 PR judge · 5 of 5 yes · #560 ↔ #433

Merge risk 🔴 MAJOR the judge's reading of the diff; app/nullius/execution.py is in the path of every run
Depth 🔴 EXTREME the deepest path is app/nullius/execution.py
Question Verdict
Changes do what the issue asks · 3 of 3 criteria ✅ yes
Issue and pull request describe the same change ✅ yes
Description matches the diff ✅ yes
Diff stays in scope ✅ yes
Risk named in the description ✅ yes
Before and after shown –
Acceptance criteria, 3 of 3 met
# Criterion Verdict
1 job._write writes through ondisk.write_whole, never through a link or folder at the path. ✅ met
2 merge writes each trial's result.json through ondisk.write_whole. ✅ met
3 A failed trial write leaves the previous file or none, never a part (test). ✅ met
Checks the script runs itself, 4 of 4 pass
No machine attribution trailer in the commits or the description ✓
New code under app/, docs/, .github/, .agents/ or .claude/ ✓
No Flask import under the backend package ✓
No key-shaped string in the diff ✓

@github-actions github-actions Bot added the needs review Tests pass, no conflict, no verdict on its latest commit label Dec 1, 2026
@aitianshi
aitianshi merged commit 20797d2 into main Dec 1, 2026
6 checks passed
@aitianshi
aitianshi deleted the fix/trial-write-whole-433 branch December 1, 2026 13:41
@github-actions github-actions Bot removed the needs review Tests pass, no conflict, no verdict on its latest commit label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A page load during a trial's write can read half of its result.json

1 participant